import os
import pymysql

pymysql.install_as_MySQLdb()
from django.conf import settings
from . import settings as st

os.environ['DJANGO_SETTINGS_MODULE'] = "settings"  # 必须在导入transaction之前设置settings模块的名称，transaction会引用settings模块

if not settings.configured:
    settings.configure(
        DATABASES=st.DATABASES,
        INSTALLED_APPS=[
            'django.contrib.admin',
            'django.contrib.auth',
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'django.contrib.messages',
            'django.contrib.staticfiles',
            'wzusxjm',
        ]
    )

import django
django.setup()
